<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>CSS3响应式布局项目开发</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            list-style: none;
            text-decoration: none;
        }

        .header {
            position: fixed;
            width: 100%;
            height: 80px;
            background: #fff;
            border-bottom: 1px solid #ccc;
            top: 0;
            left: 0;
        }

        .header .nav {
            position: relative;
            width: 80%;
            height: 100%;
            border: 1px solid black;
            margin: 0 auto;
        }

        .header .nav .logo {
            position: absolute;
            display: inline-block;
            height: 50px;
            top: 50%;
            margin-top: -25px;
        }

        .header .nav ul {
            float: right;
        }

        .header .nav ul li {
            float: left;
            color: #777;
            margin: 0 20px;
            line-height: 80px;
        }

        @media screen and (max-width:900px) {
            .header {
                height: 50px;
            }

            .header .nav {
                background: turquoise;
            }

            .header li {
                margin: 0 10px;
                line-height: 50px;
            }
        }

        @media screen and (max-width:700px) {
            .header {
                height: 50px;
            }

            .header .nav {
                background: orange;
            }

            .header ul {
                display: none;
            }
        }
        .project {
            width: 80%;
            margin: 0 auto;
        }
        .project .list {
           width: 100%;
        }
        .project .list div{
           display:inline-block;
           width: 260px;
           height: 150px;
           margin: 20px;
        }
        .project .list div img{
           width: 100%;
        }
        @media screen and (max-width:900px) {
            .project .list div{
                width: 250px;
                margin: 10px;
            }
        }

        @media screen and (max-width:700px) {
            .project .list div{
                width: 450px;
                margin: 10px auto;
            }
        }
    </style>
</head>

<body>
    <div class="header">
        <div class="nav">
            <a href="#" class="logo">首页logo</a>
            <ul>
                <li>首页展示</li>
                <li>首页展示</li>
                <li>首页展示</li>
                <li>首页展示</li>
                <li>首页展示</li>
            </ul>
        </div>
    </div>
    <div class="project">
        <div class="title">
            <p>热销项目</p>
        </div>
        <div class="list">
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
            <div class="item"><img src="./img/bg.jpg" alt=""></div>
        </div>
    </div>
</body>

</html>